# /usr/bin/python
# -*- coding: utf-8 -*-

import os,sys
BASE_DIR = os.path.dirname(os.path.abspath(os.curdir))
sys.path.append(BASE_DIR)
from models.MySQL import MySQL
from conf.setting import templates 
from util.log import get_stream_logger
from models.Zabbix import ZBX

with MySQL() as cur:
    bind_list = cur.search("SELECT grp_id,tpl_id FROM grp_tpl WHERE tpl_id=1")
    for i in bind_list:
        cur.update("UPDATE grp_tpl SET tpl_id=39 WHERE tpl_id=1")